﻿using CommunityToolkit.Mvvm.Input;
using System.Windows.Input;

namespace AZai.ViewModel
{
    public class HomeViewModel : TabBase
    {
        private ViewModelExampleBase _exampleVM;
        public HomeViewModel(ViewModelExampleBase exampleVM)
        {
            _exampleVM = exampleVM;
            IsPinned = true;
        }

        /// <summary>
        /// 命令Command
        /// </summary>
        public ICommand OpenMenu => new RelayCommand<string>((e) =>
        {
            if (e == null)
            {
                return;
            }
            _exampleVM.AddNewPage(e, PageType.Bidding);
        });
    }
}
